<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<% 
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="<%=basePath%>/static/assets/js/jquery.min.js"></script>
<title>登录页面</title>
</head>
<body>
	<a href="https://www.baidu.com" >百度一下，你就知道</a>
	<form id="form"  method="post">
		<table width="100%" border="0">
			<tr>
				<td width="60" height="40" align="right">用户名&nbsp;</td>
				<td><input type="text" value="" class="text2" name="memberNo"
					id="memberNo" /></td>
			</tr>
			<tr>
				<td width="60" height="40" align="right">密&nbsp;&nbsp;码&nbsp;</td>
				<td><input type="password" value="" class="text2"
					name="password" id="password" /></td>
			</tr>
			<tr>
				<td width="60" height="40" align="right">&nbsp;</td>
				<td><div class="c4">
						<input type="submit" value="提交" class="btn2" />
					</div></td>
			</tr>
		</table>
	</form>
</body>

<script type="text/javascript">
	$("#form").submit(function() {
		//请求验证
		$.ajax({
			type : 'post', //类型
			url : baseUrl + 'login.do', //请求地址
			dataType : "json", //类型
			data : $('#form').serialize(),
			success : function(res) {
				if (res.success) {
					window.location.href = baseUrl + "views/welcome.jsp";
				} else {

				}
				return false;
			}
		});
		return false;
	});
</script>
</html>